home *** CD-ROM | disk | FTP | other *** search
- #==========================================================================
- # INDEMO.MAK
- #
- # Creates INDEMOx.EXE from object files.
- #
- # MAKE.EXE doesn't support redirection on ECHO, so this file calls
- # INDEMRSP.BAT to create the response file, INDEMO.RSP, required
- # by TLINK. If INDEMRSP.BAT is not available, you can recreate
- # it from the following comments.
- #
- # ::INDEMRSP.BAT
- # echo off
- # set op=%path%
- # path=%1
- # for %%x in (INDEMLIB INDEMO) do if "%%x"=="%path%" goto :%%x
- # path=%0
- # echo %path%.BAT is meant to be called by INDEMLIB.MAK or INDEMO.MAK...
- # goto :EXIT
- # :INDEMLIB
- # echo Creating %1.rsp ...
- # echo -+incon & > %1.rsp
- # echo -+inalpha & >> %1.rsp
- # echo -+infloat & >> %1.rsp
- # echo -+inintgr & >> %1.rsp
- # echo -+intempl & >> %1.rsp
- # echo -+inutil & >> %1.rsp
- # echo -+stringz >> %1.rsp
- # goto :EXIT
- # :INDEMO
- # for %%x in (s m c l S M C L) do if "%%x"=="%2" goto :OK
- # echo Requires memory model (s, m, c, or l)
- # goto :EXIT
- # :OK
- # echo Creating %1.rsp ...
- # echo \tc\lib\c0%2+ > %1.rsp
- # echo indemo%2 + >> %1.rsp
- # echo inhelp%2 + >> %1.rsp
- # echo incon%2 + >> %1.rsp
- # echo inalpha%2 + >> %1.rsp
- # echo infloat%2 + >> %1.rsp
- # echo inintgr%2 + >> %1.rsp
- # echo intempl%2 + >> %1.rsp
- # echo inutil%2 + >> %1.rsp
- # echo addattr + >> %1.rsp
- # echo stringz >> %1.rsp
- # :EXIT
- # path=%op%
- # set op=
- #==========================================================================
- # TCC options are:
- # -c compile to OBJ
- # -d merge duplicate strings
- # -f- no floating point
- # -G optimize for speed
- # -I include directories
- # -L library directories
- # -mx memory model x
- # -N check stack overflow
- # -O jump optimization
- # -o name object file
- # -r use register variables
- # -S compile to ASM
- # -v source debugging on
- # -w display all warnings
- # -y line numbers in OBJ
- # -Z register optimization
- #
- # TASM options are:
- # /ml all symbols case sensitive
- # /t suppress messages if assembly ok
- # /w2 enable warning messages
- # /z display source line w/error message
- #
- # TLINK options are:
- # /c case significant
- # /d warn duplicate symbols
- # /m map file w/public symbols
- # /v debugging info in .exe file
- #==========================================================================
-
- # If memory model not defined, use large.
-
- !if !$d(MDL)
- MDL=l
- !endif
-
- # Define paths for Turbo C and output directories. Make changes to these
- # constants if your directory structure is set up differently.
-
- TCC = \tc\tcc # path to TCC.EXE
- TASM = \tasm\tasm # path to TASM.EXE
- TLIB = \tc\tlib # path to TLIB.EXE
- TLINK = \tc\tlink # path to TLINK.EXE
- O_DIR = \tc\usr\ # output directory
- I_DIR = \tc\inc;\tc\inc\sys # include directory
- L_DIR = \tc\lib\ # library directory
- NAME = indemo$(MDL)
-
- # Object and library modules required to make INDEMOx.EXE.
-
- OBJS = @indemo.rsp
- LIBS = $(L_DIR)emu $(L_DIR)math$(MDL) $(L_DIR)c$(MDL)
-
- # Compiler, linker, assembler options.
-
- !if $d(DEBUG)
- C_OPTS = -c -d -f- -G -I$(I_DIR) -m$(MDL) -N -O -o$& -r -w -v -y -Z
- L_OPTS = /c/d/m/v
- !else
- C_OPTS = -c -d -f- -G -I$(I_DIR) -m$(MDL) -O -o$& -r -w -Z
- L_OPTS = /c/d/m
- !endif
- A_OPTS = /ml/t/w2/z
-
- # Compile and link commands.
-
- COMPILE = $(TCC) $(C_OPTS)
- LINK = $(TLINK) $(L_OPTS)
-
- # Common header files.
-
- H_FILES = indecl.h indefs.h
-
- # Create INDEMOx.EXE.
-
- $(NAME).exe: $(NAME).obj inhelp$(MDL).obj incon$(MDL).obj \
- inalpha$(MDL).obj infloat$(MDL).obj inintgr$(MDL).obj \
- intempl$(MDL).obj inutil$(MDL).obj addattr.obj \
- stringz.obj
- indemrsp indemo $(MDL) # call INDEMRSP.BAT
- $(LINK) $(OBJS), $(NAME), $(NAME), $(LIBS)
- del indemo.rsp
-
- # The compiler command lines below include a macro defined by
- # Borland's MAKE.EXE that allows use of switches stored in
- # environment variables. The macros below all reference an
- # environment variable named X, defined by "set x=text_string".
-
- $(NAME).obj: indemo.c $(H_FILES)
- $(COMPILE) -f $(X) indemo
-
- inhelp$(MDL).obj: inhelp.c $(H_FILES) addattr.h
- $(COMPILE) $(X) inhelp
-
- incon$(MDL).obj: incon.c incon.h $(H_FILES) instats.h stringz.h
- $(COMPILE) $(X) incon
-
- inalpha$(MDL).obj: inalpha.c incon.h $(H_FILES)
- $(COMPILE) $(X) inalpha
-
- infloat$(MDL).obj: infloat.c incon.h $(H_FILES)
- $(COMPILE) $(X) infloat
-
- inintgr$(MDL).obj: inintgr.c incon.h $(H_FILES)
- $(COMPILE) $(X) inintgr
-
- intempl$(MDL).obj: intempl.c incon.h $(H_FILES)
- $(COMPILE) $(X) intempl.c
-
- inutil$(MDL).obj: inutil.c $(H_FILES)
- $(COMPILE) $(X) inutil
-
- .asm.obj:
- $(TASM) $(A_OPTS) $<;
-
- addattr.obj: addattr.h
- stringz.obj: stringz.h
-
- #### EOF: INDEMO.MAK ####